package lianxi;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;

import com.DBUtil;

public class _04_ {

	public static void main(String[] args) throws ClassNotFoundException, SQLException {
		Connection connection = DBUtil.getConnection();
		String sql = "update t_goods set price = 1888 where name = '小米电视'";
		PreparedStatement preparedStatement = connection.prepareStatement(sql);
		int count = preparedStatement.executeUpdate(sql);
		System.out.println(count);
		DBUtil.close(preparedStatement);
		DBUtil.close(connection);
	}

}
